﻿<div class="modal fade" id="student_import_window" aria-hidden="true" role="dialog" data-backdrop="static">
    <div class="modal-dialog">
        <div class="modal-content">
            <form class="form-horizontal uiform" id="student_import_form" enctype="multipart/form-data" method="post" action="@Url.Action("ImportSave")">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">学员导入</h4>
                </div>
                <div class="modal-body">

                    <div class="form-group">
                        <label class="control-label col-md-3">
                            <span class="required"> * </span>
                            学员文件：
                        </label>
                        <div class="col-md-8">
                            <input name="attachment" type="file" class="uifileupload"
                                   accept=".xls,.xlsx"
                                   data-validate="required: true"
                                   data-validate-message="required:'请选择学员文件'">
                        </div>
                    </div>

                </div>
                <div class="modal-footer">

                    <a class="btn btn-default" href="/www/tpl/学员导入.xlsx">
                        <i class="fa fa-file-excel-o"></i> 模板下载
                    </a>

                    <button class="btn btn-primary" type="submit">
                        <i class="fa fa-save"></i> 导入
                    </button>

                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        <i class="fa fa-sign-in"></i> 关闭
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $('#student_import_form').on('submitsuccess', function (e, result) {
        $('#student_import_window').on('hidden.bs.modal', function () {
            $('.search-table').find(':submit').click();
            fx.serverResult(result.items);
        });
        $('#student_import_window').modal('hide');
    });
</script>